import request from '@/utils/request'
const api = {

  // 重新获取权限Token
  CheckNowLoginState() {
    return request({
      url: '/api/SystemManage/CheckNowLoginState',
      method: 'post'
    })
  },

  // 获取所有组织机构数据
  getAllOrganizations(data, method) {
    return request({
      url: '/api/Organization/GetAllOrganizations',
      method: method || 'post',
      data: data
    })
  },
  // 获取所有员工数据
  getMatchEmployees(data, method) {
    return request({
      url: '/api/Business/GetMatchPageEmployees',
      method: method || 'post',
      data: data
    })
  },
  // 获取单个员工详情
  GetSingleEmployee(data, method) {
    return request({
      url: '/api/Business/GetEmployeeDetail',
      method: method || 'post',
      data: data
    })
  },
  // 修改员工基本信息
  UpdateEmployeeBaseData(data, method) {
    return request({
      url: '/api/Business/UpdateEmployeeBaseData',
      method: method || 'post',
      data: data
    })
  },
  // 获取某个组织架构下得所有部门
  getOrgDepart(data, method) {
    return request({
      url: '/api/Department/GetDepartmentTreeData',
      method: method || 'post',
      data: data
    })
  },

  // 获取所有角色
  QueryMatchSystemRoleDataList(data, method) {
    return request({
      url: '/api/SystemManage/QueryMatchSystemRoleDataList',
      method: method || 'post',
      data: data
    })
  },

  // 获取所有部门
  GetAllDepartments(data, method) {
    return request({
      url: '/api/Department/GetAllDepartments',
      method: method || 'post',
      data: data
    })
  },
  // 新增组织机构数据
  AddOrganization(data, method) {
    return request({
      url: '/api/Organization/AddOrganization',
      method: method || 'post',
      data: data
    })
  },
  // 新增部门数据
  AddDepartment(data, method) {
    return request({
      url: '/api/Department/AddDepartment',
      method: method || 'post',
      data: data
    })
  },
  // 删除部门数据
  DeleteDepartment(data, method) {
    return request({
      url: '/api/Department/DeleteDepartment',
      method: method || 'post',
      data: data
    })
  },
  // 修改部门数据
  UpdateDepartment(data, method) {
    return request({
      url: '/api/Department/UpdateDepartment',
      method: method || 'post',
      data: data
    })
  },
  // 新员工注册
  RegisterNewEmployee(data, method) {
    return request({
      url: '/api/Business/RegisterNewEmployee',
      method: method || 'post',
      data: data
    })
  },
  // 获取所有可用角色数据
  GetAllSystemRoles(data, method) {
    return request({
      url: '/api/SystemRole/GetAllSystemRoles',
      method: method || 'post',
      data: data
    })
  },
  // 重置员工密码
  restPwd(data, method) {
    return request({
      url: '/api/Business/ExcuteResetLoginPassWord',
      method: method || 'post',
      data: data
    })
  },
  // 设置操作人员账户的状态（禁用/启用）
  disableOrEnable(data, method) {
    return request({
      url: '/api/Business/ExcuteUpdateManageAccountState',
      method: method || 'post',
      data: data
    })
  },
  // 激活员工管理账号
  activeEmployee(data, method) {
    return request({
      url: '/api/Business/ActiveEmployeeManageAccount',
      method: method || 'post',
      data: data
    })
  },
  // 删除员工账号
  deleEmployee(data, method) {
    return request({
      url: '/api/Employee/DeleteEmployee',
      method: method || 'post',
      data: data
    })
  },
  // 人员组件选择人员得时候得员工数据
  queryEmployee(data, method) {
    return request({
      url: '/api/Business/QueryMatchEmployeeDataList',
      method: method || 'post',
      data: data
    })
  },
  // 修改角色权限
  UpdateEmployeeManageRole(data, method) {
    return request({
      url: '/api/Business/UpdateEmployeeManageRole',
      method: method || 'post',
      data: data
    })
  },

  // 获得员工详细数据
  GetEmployeeDetail(data, method) {
    return request({
      url: '/api/Business/GetEmployeeDetail',
      method: method || 'post',
      data: data
    })
  },

  // 员工类型
  GetEmployeeTypeList(data, method) {
    return request({
      url: '/api/Business/GetEmployeeTypeList',
      method: method || 'post',
      data: data
    })
  },

  //员工状态
  GetEmployeeStateList(data, method) {
    return request({
      url: '/api/Business/GetEmployeeStateList',
      method: method || 'post',
      data: data
    })
  },

  //民族
  GetEmployeeNationList(data, method) {
    return request({
      url: '/api/Business/GetEmployeeNationList',
      method: method || 'post',
      data: data
    })
  },

  //婚姻状况
  GetEmployeeMaritalStatusList(data, method) {
    return request({
      url: '/api/Business/GetEmployeeMaritalStatusList',
      method: method || 'post',
      data: data
    })
  },

  //户籍类型
  GetRegisteredResidenceTypeList(data, method) {
    return request({
      url: '/api/Business/GetRegisteredResidenceTypeList',
      method: method || 'post',
      data: data
    })
  },

  //政治面貌
  GetPoliticsStatusList(data, method) {
    return request({
      url: '/api/Business/GetPoliticsStatusList',
      method: method || 'post',
      data: data
    })
  },

  //学历
  GetDegreeList(data, method) {
    return request({
      url: '/api/Business/GetDegreeList',
      method: method || 'post',
      data: data
    })
  },

}
export default api
